import request from '@/utils/request'

// 获取分类品牌分页信息
export function list(obj) {
    return request({
        url: `/product/categoryBrand/list`,
        method: 'get',
        params: obj
    })
}

//新增分类品牌
export function addCategoryBrand (data) {
    return request({
        url: `/product/categoryBrand`,
        method: 'post',
        data
    })
}
//修改分类品牌前的回显
export function getCategoryBrandDetailInfo (id) {
    return request({
        url: `/product/categoryBrand/${id}`,
        method: 'get'
    })
}
export function updateCategoryBrand (data) {
    return request({
        url: `/product/categoryBrand`,
        method: 'put',
        data
    })
}
//删除分类品牌
export function deleteCategoryBrand (id) {
    return request({
        url: `/product/categoryBrand/${id}`,
        method: 'delete'
    })
}
export function getCategoryBrandAll(categoryId) {
    return request({
        url: '/product/categoryBrand/brandList/' + categoryId,
        method: 'get'
    })
}